<?php

$oReq = &App::getRequest();
$oTpl = &App::getTemplate();

$oLang = &App::getLanguage();

if ( $iDelete = $oReq->get('deleteid') )
{
	$oLang->deleteLanguage($iDelete);
	App::gotoUrl('admin.language.manager', array(), App::format('language_deleted'), false);
}

if ( $iDefault = $oReq->get('default') )
{
	$oLang->setDefault($iDefault);
	$oTpl->assign('bDoRefresh', true);
}

$aItems = $oLang->getLanguages();

$oTpl->assign(array
(
	'aItems' => $aItems,
));

?>
